<template lang="pug">
.df 
    file-upload(:uploadData="datas" :isHead="false"  :viewDatas="vDatas" :isView="isView"
     @handleAvatarSuccessFun="successFun") 
    
</template>

<script lang="ts">
import { defineComponent,reactive,ref } from 'vue'
import FileUpload from "@/components/upload/fileUpload.vue" 

interface FileData{
  imageUrl: string; 
}


export default defineComponent({
  components: {
    FileUpload
  },
  setup(){
    const isView = ref(false);
    const datas = reactive<FileData>({
      imageUrl:''
    });

     const vDatas = reactive([
       'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg'
    ]);
    const successFun= (res: any,file: any)=> {
      datas.imageUrl=  URL.createObjectURL(file.raw);
        console.log(333)
    }
    return {isView,datas,vDatas,successFun}
  },
})
</script>

